package kr.or.kead.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySqlCon {
	public static Connection getDatabaseConnection() throws ClassNotFoundException, SQLException
	{
		Class.forName("com.mysql.jdbc.Driver");
		try {
			return DriverManager.getConnection("jdbc:mysql://localhost:3306/daegu_kead", "root", "apmsetup");
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}
	}
	
	public static Connection getConn()
	{
		Connection con = null;
		try {
			con = MySqlCon.getDatabaseConnection();
		} catch (ClassNotFoundException e1) {
			e1.printStackTrace();
		} catch (SQLException e1) {
			e1.printStackTrace();
		}
		return con; 
	}
}
